class Hour < ActiveRecord::Base
  
  belongs_to :project
  belongs_to :user
  
  validates_presence_of :project_id
  
  attr_accessible :project_id, :date, :start_time, :end_time, :user_id, :description
  
  def confirm
    update_attribute(:confirmed, true) unless self.confirmed?
  end
end
